<template>
  <view>
    <view class="cu-item solid-bottom margin-sm" @tap.stop="redirectOrder">
      <view class="content" style="left: 1rem;">
        <view>
          <view class="text-cut">{{orderDetail.order.productName}}</view>
          <!--        <view class="cu-tag round bg-orange sm">{{order.orderStatusName}}</view>-->
        </view>
        <view class="text-gray text-sm flex">
          <view class="text-cut"> {{orderDetail.order.poiName}} >> <text class="text-orange margin-right-xs"></text> 订单编号： {{orderDetail.orderId}}</view></view>
      </view>
      <view class="action flex">
        <view class="text-gray flex-sub">￥{{orderDetail.orderPrice}}</view>
        <view class="text-white text-custom-bg radius sm cu-tag margin-top-sm">{{orderDetail.orderOwnerName}}</view>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">

import {onReachBottom, onLoad} from "@dcloudio/uni-app";
import {ref, onMounted, reactive, toRaw, computed} from "vue";

import {useStore} from "@/common/store";
const store = useStore();

const userId = computed(() => store.userId)

interface Prop {
  orderDetail :{
    id: number
    verifyId: number
    adminId: number
    poiId: number
    orderId: number
    orderPrice : number
    orderOwnerId: number
    orderOwnerName: string
    statusFlag: number
    delFlag: number
    createUser: string
    createTime: Date
    updateTime: Date
    remark: Date,
    order: {}
  }
}

// 传递过来的参数
const props = defineProps<Prop>();

const redirectOrder = ()=> {
  uni.navigateTo({
    url: `/pages/order/OrderDetail?id=${props.orderDetail.order.id}`
  })
}

</script>

<style>
</style>
